package com.junwei.smsdemo.controller;

import com.junwei.smsdemo.service.SendSmsService;
import com.junwei.smsdemo.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description: 阿里短信
 * @author: gsy
 * @create: 2020-09-26 13:30
 **/
@RestController
public class SendSmsController {
    @Resource
    private SendSmsService sendSmsService;

    @RequestMapping(value = "/sendSms")
    public R sendSms() {
        boolean sendFlag = sendSmsService.sendSms("13667217563","123456");
        if (sendFlag){
            return R.SUCCESS;
        }else {
            return R.sms_send_error;
        }
    }
}
